<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<c:if test="${!empty payments}">

	<h1>Add new payment</h1>
	<div class="container dontprint">
		<form method="post" action="payments/search">

			<script type="text/javascript"
				src='<c:url value="/resources/js/jquery-1.11.0.js"></c:url>'></script>
			<script type="text/javascript"
				src='<c:url value="/resources/js/bootstrap-datepicker.js"></c:url>'></script>

			<input type="text" class="input-medium"
				value="<c:if test="${not empty sum}">${sum}</c:if>" name="sum"
				placeholder='sum' />
			<select name="select2">
					<option selected="selected">Select payment method</option>
					<option>Viza</option>
					<option>WebMoney</option>
					<option>Erip</option>
			</select>
<!-- 			<input type="text" class="input-medium" -->
<%-- 				value="<c:if test="${not empty metodPayment}">${metodPayment}</c:if>" --%>
<!-- 				name="metodPayment" placeholder='select payment method' /> -->
				 <input
				type="submit" class="btn btn-primary" value="Save" />

		</form>
	</div>
	<h1>Payments</h1>
	<form method="get" action="payments">

		<table class="table table-hover">
			<tr>
				<th>Number</th>
				<th>Date Activation</th>
				<th>Sum</th>
			</tr>
			<c:forEach items="${payments}" var="payment">
				<tr>
					<td>${payment.id}</td>
					<td>${payment.dateActivation}</td>
					<td>${payment.sum}</td>
				</tr>
			</c:forEach>
		</table>
	</form>
</c:if>
